package application;

import javafx.animation.PathTransition;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Line;
import javafx.stage.Stage;
import javafx.util.Duration;

public class FlagRisingAnimation extends Application {

	@Override
	public void start(Stage primaryStage) {
	
		Pane pane = new Pane();
		ImageView imageView = new ImageView("Flag.png");
		imageView.setFitWidth(40.96);
		imageView.setFitHeight(27.30);
		
		
		Line line = new Line(125, 200, 125, 0);
		line.setStrokeWidth(5);
		line.setStroke(Color.BLACK);
		

		
		pane.getChildren().addAll(imageView);
		

		
		PathTransition pt = new PathTransition(Duration.millis(10000), line, imageView);
		pt.setCycleCount(5);
		pt.play();
		
		Scene scene = new Scene(pane, 250 ,200);
		primaryStage.setTitle("FlagRisingAnimation");
		primaryStage.setScene(scene);
		primaryStage.show();
	}
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Application.launch(args);
	}

}
